package com.jic.member.mapper;

import com.jic.member.entity.MememberIntegralRule;
import com.jic.member.request.MememberIntegralTypeRequest;
import com.jic.member.response.MememberIntegralRuleCustomizeTypeResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 会员积分规则主表
 * @author : 
 * @email : 
 * @since : 2020-04-02 03:38:35
 * @version : v1.0.0
 */
@Mapper
public interface  MememberIntegralRuleMapper {

    long insert(MememberIntegralRule mememberIntegralRule);

    long delete(Long ruleId);

    long update(MememberIntegralRule mememberIntegralRule);

    MememberIntegralRule queryByPrimaryKey(Long ruleId);

    List<MememberIntegralRule> query(MememberIntegralRule mememberIntegralRule);

    List<MememberIntegralRule> queryPage(@Param("startIndex") int startIndex, @Param("limit") int limit, @Param("mememberIntegralRule") MememberIntegralRule mememberIntegralRule);

    long queryPageCount(MememberIntegralRule mememberIntegralRule);


    /**
     * 更新状态 暂不合并
     * @param mememberIntegralRule
     */
    int updateStatus(MememberIntegralRule mememberIntegralRule);

    /**
     * 更新删除标示
     * @param mememberIntegralRule
     * @return
     */
    int updateDeleteFlag(MememberIntegralRule mememberIntegralRule);


    /**
     * 规则类型
     * @param mememberIntegralRule
     * @return
     */
    List<MememberIntegralRule> queryRuleType(MememberIntegralRule mememberIntegralRule);

    /**
     * 查询积分规则类型信息
     * @param memberRequest
     * @return
     */
    Long queryIntegraRuleInfo(MememberIntegralTypeRequest memberRequest);

    Long stopStatus(MememberIntegralRule memberRequest);

    List<MememberIntegralRuleCustomizeTypeResponse> queryObtainMode();

    List<MememberIntegralRuleCustomizeTypeResponse> queryConsumeMode();
}